The present invention relates to an image forming apparatus which is used as, for example, an electronic copying machine.
An electronic copying machine comprises a document unit which is reciprocally provided on an upper portion of a console. When the document unit is moved with a document thereon, a photoconductive drum is exposed in accordance with an image on the document, thereby forming an electrostatic latent image on the drum. The thus formed latent image is transferred to paper fed from a paper feeding cassette and is fixed thereon, thus obtaining a copy.
In a copying machine of this type, in order to shorten the copying time in the continuous copying mode, a rear edge of a paper sheet fed from a paper feeding cassette is detected by a sensor switch, and a document unit can be quickly returned in accordance with the paper size.
However, in a recent compact electronic copying machine, when a distance between a paper feeding unit and a transfer unit becomes small, a distance between a switch for detecting the rear edge of the paper and the transfer unit also becomes smaller than a distance between the transfer unit and an exposure unit. For this reason, when a paper size is detected by the switch and then the document unit is returned, the document unit can move for a distance exceeding the detected paper size. Therefore, in the compact copying machine, the document unit cannot be quickly returned, resulting in an undesirably long copying time in the continuous copying mode.